
<?php
	include 'config.php';
//form 1
	if (isset($_POST['refSubmit1'])) {
	function clean($text)
{
	$text = strip_tags($text);
	$text = trim($text);
    return ($text); //output clean text
};

$starter = "For me, the most ";
$choice1 = $_POST['choicebank1'];
$choice2 = $_POST['choicebank2'];
$filler1 = "was ";
$free = $_POST['free']; 
$reflection =			$starter . 
				$choice1 . 
				" ". 
				$choice2 . 
				" ".  
				$filler1 .  
				$free;
	}

//form 2
	if (isset($_POST['refSubmit2'])) {
	function clean($text)
{
	$text = strip_tags($text);
	$text = trim($text);
    return ($text); //output clean text
};

$choice1 = $_POST['2_choicebank1'];
$filler1 = " I ";
$choice2 = $_POST['2_choicebank2'];
$free2 = $_POST['free2']; 
$reflection =	
				$choice1 .
				$filler1 . 
				$choice2 . 				 
				$free2;
}	;	
	$lextimedate = $_SESSION['lextimedate'];
	$userid = $_SESSION['userid'];
	$query = "UPDATE lex SET lexreflect = '$reflection' WHERE lextimedate = '$lextimedate' AND userid = '$userid'"; 
	$result = mysqli_query($con,$query) or die ("Could not record reflection in database");
	

	
	

//description

//user

//skills

//context
?>